Extending a Method of Devising Software Contracts

نویسندگان

  • Richard Mitchell
  • James McKim
چکیده

Classes in object-oriented programs can be specified using assertions, specifically, preconditions and postconditions on individual methods and invariants on whole classes. Such assertions can be seen as forming a contract between a class and its client classes and, by extension, between the developers of a class and the developers of client classes. In some programming environments, the contracts can be checked at runtime. A published method of devising contracts is applied to a small framework based on the observer pattern, raising a number of problems of writing contracts for a set of collaborating classes, rather than for individual classes such as those found in data structure libraries. As well as providing an example of tackling such problems, the paper identifies desirable extensions to the method of devising contracts, to address aspects of: performance (keeping the run-time cost of evaluating preconditions low); privacy (ensuring that one client of a class cannot discover the identities of other clients); extensibility (allowing subclasses to weaken preconditions without invalidating existing postconditions, and allowing subclasses to adopt different frame rules); and kinds of constraints (distinguishing physical and logical

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Modelling and Experimental Testing of Asymmetric Information Problems in Lease and Hire Contracts (Based on Contract Theory)

This article aims to study lease and hiring contract in the Iranian-Islamic setting and analyze the asymmetric information problem in these contracts. For doing this, we study the characteristics of lease and hiring contracts in Iran (real world experimental characteristics that recognized in other studies), using library method, then we mathematically model different aspects of asymmetric info...

متن کامل

Explain the optimal pattern in the contracts of public private Participation construction, exploitation and transfer (BOT) Applied to Contracts Theory

In recent decade in developing countries, lack of government budget or lack of access to modern technology, persuade governments to attract private sector participation in the economy. One of the most common methods is Public-Private Partnership agreements. The real implementation of this type of partnership needs to set contracts that satisfies preferences of both parties. This research aims t...

متن کامل

Extending Operational Zone of Rotary Power Flow Controller by Controlling Tap-changers of Transformers

This paper proposes a method for extending the ability of rotary power flow controller (RPFC) using tap-changer of the RPFC’s transformers. A detailed model of the device is presented to analyze the effects of the tap changer operation on the performance of the RPFC. To evaluate the results, the RPFC model is simulated using PSCAD/EMTDC software. Dynamic operation of the RPFC on a 400 kV transm...

متن کامل

Making Specifications Complete Through Models

Good components need precise contracts. In the practice of Design by Contract, applications and libraries typically express, in their postconditions and class invariants, only a subset of the relevant properties. We present: – An approach to making these contract elements complete without extending the assertion language, by relying on “model classes” directly deduced from mathematical concepts...

متن کامل

Investigating and Comparing the Position of Force Majeure and the Impossibility of Contracts in Iranian Oil Contracts

The effect of the two legal entities of force majeure and the impossibility (frustration) of the contract is almost similar, and that is the impossibility of fulfilling the obligation or contract. However, these two theories, although are very similar in practice, have some differences that distinguish them from each other; Initially, the question was what is the nature of the two institutions ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1999